package com.xiyue.leaspring.service;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import com.xiyue.leaspring.vo.Dept;

import junit.framework.TestCase;

@ContextConfiguration(locations = {"classpath:spring/spring-base19.xml"})//进行资源文件定位
@RunWith(SpringJUnit4ClassRunner.class)//设置要使用的测试工具
public class DeptServiceTest3 {

	@Autowired
	@Qualifier("deptServiceNew")
	private IDeptService2 deptService;//注入业务对象
	
	@Test
	public void testAdd() {
		Dept vo = new Dept();//创建VO类对象
		vo.setDeptno(10L);//设置属性
		vo.setDname("西欧i阿斯顿");//设置属性
		TestCase.assertTrue(this.deptService.add(vo));
	}

}
